How can I make my League of Legends team work more effectively?

Cole Watkins

Introduction

League of Legends is one of the first MOBA-style games from the developer Riot Games. Two teams of five must compete against each other to destroy each other's structures and compete over side-objectives to ultimately destroy the other team's main base called the nexus. Each team consists of a player in the top lane, a player in the middle lane, a player in between the lanes in an area called the "jungle", and two players in the bottom lane. There are a litany of game mechanics to learn and master, and I will be comparing myself and my friend's proficiencies in some of these game mechanics.

I have a thought in my head of who is better or worse at this game in my friend group, but I would like to get into the nitty gritty of who's the best/worst at specific game mechanics in order for us to work better together as a team, or even just something to help me get better at the game, as I adore improving at my video game skill.

Data Wrangling

I will be using Riot's own API. This API requires that you first request by summoner name (which is the in-game username) and then request by that summoner's accountid, which is a value hidden to a typical user.

This second request will vary on what queue type you are looking for. My friends and I play mostly normal games and ARAM games, so I will be looking at queue=400 (normals), as ARAM games are not tracked as well.

Queue ids can be found here: https://static.developer.riotgames.com/docs/lol/queues.json

The other value you have to pay attention is is season. I personally have played a lot this current season, which is season 11, so I will be using season=13. Documentation for season ID is unfortunately deprecated. You'll have to trial and error this.

Additionally, since seasonID is deprecated, you'll have to manually check the dataframe to make sure it has this year's games. This can be done by cross referencing the dataframe with League of Legends's match history (https://matchhistory.na.leagueoflegends.com/en/#match-history) and by checking the number of games you have in your LoL client. (Profile -> stats -> hover over games played to see queue type). Sadly this does not count ARAM games, so that would also have to be manually checked.

Data requests can only have 100 matches per request, so we'll have to make multiple requests and stich them together. Furthermore, the API limits requests to 20 requests per second or 100 requests per 2 minutes, so this implementation must be built around that.

Once we have retrieve these values we must isolate the matches data from the request into a dataframe.

Users to be compared as I will be using first names for my sake.

Coolgum15 = Cole (Me!)

Rotome = Jerry

Dublaiar = Aidan

I have had 187 normal games of League of Legends this year, and I will compare this data to the same data my friends have acheived in the past 187 normal games

Then we can request once again, this time using the gameId to get the specific data of that match. Since this will be processing a large number of requests, as we must make a request for each match (187 per player!), the requests must be structured around the previously mentioned 100 requests per 2 minutes.

From this request we are going to isolate teammate data for analysis.

From this isolated teammate data we will also remove unnessary columns that represent parts of the game that do not impact performance (such as summoner icon), counters that don't tell us much (like number of ability casts, which varies greatly across champions), deprecated game features (like purchasable vision wards that are not control wards), account details (we don't care about puuid/summoner id anymore, only summoner name), or champion specific mechanics (like transformations).

Data Processing

Winrates

There are a lot of game aspect in League of Legends to examine, so let's look at the result of all the mechanics: winrate. This will be done by finding each user's summonerName entry in the datatable and the win entry. Each role (Top, jungle, middle, bottom, and support, AKA: top, jg, mid, bot, supp) will be examined.

Now each player plays certain roles more/less frequently. We can also track role frequency to better assess the player's skill.

Here we will also remove any role under 5% playrate, which is about 10 games, and anything less than 10 games tells us very little about their performance in a lane.

I'm anticipating Rotome will have the highest winrate, and Dublaiar will have to lowest.

The data confirms my suspicions! There is also some interesting data here for Coolgum15 and Dublaiar, where even in their most played roles (Coolgum15: Jungle, Middle and Dublaiar: Bottom) are below 50% winrate. From this data those two should maybe abandon their more played roles for other roles where they have higher winrates like Support (Utility).

Skewed Matchmaking

There is a complaint in our friend group that I would like to investigate. One person, David, that we play with sometimes is way better than us, and because of how matchmaking in League of Legends works, our average game playing with him feels harder to win than usual. He tries to alleviate this by going on a new account called a "smurf" where the matchmaking shouldn't have detected that he is good yet. So let's look into games where we play with his account or his smurf: StalwartHide / RyeBreadPitt

I will also be removing entries for lanes with no data, as there are lanes with no data due to not playing a lot of games of League with David.

Since we are looking at performance with David overall, we can remove lane specific columns to get a cleaner representation.

Data here is quite mixed. Some players perform better when David is on StalwartHide (Dublaiar) and others perform worse. Some players perform better when David is on RyeBreadPitt (Coolgum15) and others perform worse. I would say that the smurf has no overall impact if we all played a game together, but if a single player were to play a game with only David, they could be very excited or not interested at all depending on the account. However, I can definitely confirm my suspicions that playing with David's main account StalwartHide is harder than a game without him for me.

Now let's look into the parts of gameplay that are not great in order to improve a player's gameplay and their winrates.

Creep Score (CS)

In League of Legends, one of the most important aspects of your gameplay is how much money you earn. A large amount of money can come from kills, but an even larger amount can be gained through killing enemy minions or neutral jungle monsters. Killing enemy minions and jungle monsters will contribute to your creep score, or CS, and I want to investigate how creep score impacts each player's winrate. Specifically, I want to examine how creep score difference from a player's lane opponent impacts their winrate.

I will be looking at the main roles for Rotome (Mid) and Dublaiar (Bot), and at Coolgum15 overall, as I, Coolgum15, dont really have a main role. Except, I will not consider my support games, as supports aren't really supposed to CS.

I'm choosing to represent all players on one graph in order to make comparisons easier, despite the messy nature of combining graphs.

This data is hard to interpret, so we'll implement some machine learning and use a linear regression line for each player's data.

The fit on any of these lines is not great, but there is still some information we can unpack here.

Dublaiar's CS score has almost no impact on their performance, meaning that he is not making use of his gold and not pushing his lead further, but does play safe when behind.

Meanwhile, Coolgum15 has the best performance with high cs, but also the worst performance with low cs. This tells me that I do push my lead better than my friends, but I can't play safe when I'm behind on CS and end up losing

I would say Rotome has the healthiest CS difference distribution, as he does have a below 50% winrate when behind on CS, but it is very slight meaning he plays the most safe when behind. Rotome could work on pushing his leads with higher CS though, as his high-CS winrate is a little lower than expected.

Commenting on the accuracy of these points and this regression, while most of these CS bucket ranges have sufficient amounts of data, not all of them do. I did have to code around one case where there was 0 data in that bucket, despite there beind ~160 games per player. Outliers like Dublaiar's 0% winrate at a >50 CS lead are dubious, and would be rolled out in any sample size larger than this one.

Let's take a look at residuals to see if we get any more insights.

Conclusions

There are several useful conclusions from the gathered data that can push the players to do better as a whole. These I will be communicating with my team in order for us to do better in future games.

David: If our group ever decides to play with David, he doesn't have to worry about switching to his smurf account and can instead focus on levelling his main account, as the matchmaking does not favor his smurf to the group overall.

Jerry (Rotome): Jerry is effectively playing from a CS deficit, but he could be pushing his lead better, as even in games with high CS differences in his favor he still has okay winrates. However, his middle lane game is on point, and he has a solid winrate in the midlane and should continue to lane there.

Cole (Coolgum15): As much as I play jungle in order to fill a role for the team, I should either get serious about getting better at jungle, or switch to a different role that I am more successful in, like top or support. Additionally, I need to work on my middle lane play, because I'm going to keep playing it because I love it so much. Furthermore, I play HORRIBLY when behind on CS and need to improve my CS-ing skills in a bad situation, as well as getting better at playing from behind.

Aidan (Dublaiar): Aidan has plenty of areas to improves in, whether that be bot lane overall, or pushing his lead while ahead on CS, or even branching out to other roles. Aidan should most likely shift to support if he cares greatly about winrates.